﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace newAccount
{
    public static class formController
    {
        public static userinfo state;
        private static List<Window> forms;
        
        static formController()
        {
            forms = new List<Window>();

            forms.Add(new MainWindow());
            forms.Add(new userAgreement());
            forms.Add(new newUserInfo());
            forms.Add(new emailEnter());
            state = new userinfo();
        }

        public static void ShowForm(System.Type formName)
        {
            
            //Loop through the forms and check for an instance
            foreach (Window form in forms)
            {
                if (form.GetType() == formName)
                {
                    form.Show();
                }
                else
                {
                    form.Hide();
                }
            }
        }
        public static void userName(string name)
        {
            state.username = name;
        }

        public static void userPass(string pass)
        {
            state.password = pass;
        }

        public static void userEmail(string email)
        {
            state.email = email;
        }

        public static void printState()
    {
        Console.WriteLine(state.username);
        Console.WriteLine(state.password);
        Console.WriteLine(state.email);
        

    }
    }
}
